package com.adcc.ags.cgw.entity.msg;

import com.adcc.ags.cgw.entity.BaseEntity;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.google.common.base.Optional;
import com.google.common.base.Strings;

/**
 * 消息发送结果实体
 */
public class MsgSendResult extends BaseEntity{

    // 发送状态
    private MsgSendState state = MsgSendState.Fail;

    // 未发送到用户
    private String unReceiver = Strings.nullToEmpty("");

    /**
     * 构造函数
     */
    public MsgSendResult(){

    }

    /**
     * 构造函数
     * @param state
     */
    public MsgSendResult(MsgSendState state){
        this.state = state;
    }

    /**
     * 构造函数
     * @param state
     * @param unReceiver
     */
    public MsgSendResult(MsgSendState state,String unReceiver){
        this.state = state;
        this.unReceiver = unReceiver;
    }

    public MsgSendState getState(){
        return state;
    }

    public void setState(MsgSendState state){
        this.state = state;
    }

    public String getUnReceiver() {
        return unReceiver;
    }

    public void setUnReceiver(String unReceiver) {
        this.unReceiver = unReceiver;
    }

    @Override
    public Optional<BaseEntity> formatJson(String json) throws Exception {
        return null;
    }

    @Override
    public String toJSON() throws JsonProcessingException {
        return null;
    }
}
